package tk.zater.Servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Getlicexp extends HttpServlet {

	/**
		 * Constructor of the object.
		 */
	public Getlicexp() {
		super();
	}

	
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        try (PrintWriter out = response.getWriter()) {
            /* TODO output your page here. You may use following sample code. */
        out.println("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
"<GETLICEXP>\n" +
"<SECTION ID=\"1000103\">\n" +
"<LICENSEINFO>\n" +
"<NODE NAME=\"ExpirationDate\" VALUE=\"61cdd780\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"ExpirationState\" VALUE=\"0\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"ExpirationNotifyDays\" VALUE=\"ffffff\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"DistributorGUID\" VALUE=\"100\" TYPE=\"STRING\" />\n" +
"<NODE NAME=\"LicenseType\" VALUE=\"6\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"LicenseCategory\" VALUE=\"3\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"LicenseCancelledFlag\" VALUE=\"0\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"PasswordChangedFlag\" VALUE=\"0\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"InfoMessage\" VALUE=\"hello world\" TYPE=\"STRING\" />\n" +
"<NODE NAME=\"LinkUrl\" VALUE=\"\" TYPE=\"STRING\" />\n" +
"<NODE NAME=\"IsEvalVersion\" VALUE=\"1\" TYPE=\"DWORD\" />\n" +
"<NODE NAME=\"RedirectionToken\" VALUE=\"&amp;resellerId=0&amp;partnerId=100&amp;licProdCode=110&amp;batchCode=VC25\" TYPE=\"STRING\" />\n" +
"</LICENSEINFO>\n" +
"</SECTION>\n" +
"</GETLICEXP>");
        }
    }
	
	
	
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
processRequest(request,response);
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
processRequest(request,response);
	}

}
